<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<p:dialog widgetVar="funcAtualizarDialogWidget"
		id="funcAtualizarDialogId" height="150" width="500" modal="true"
		closable="true" draggable="false" resizable="false">
		<h:form id="funcAtualizarDialogForm" prependId="false">
			<h:panelGrid columns="2">
				<h:outputText value="* #{bundle.nomeFuncionario}" />
				<h:inputText value="#{funcionarioMB.funcionario.nome}" required="true"
					label="#{bundle.nomeFuncionario}" />

				<h:outputText value="#{bundle.identFuncionario}" />
				<h:inputText value="#{funcionarioMB.funcionario.identificacao}" required="false"
					label="#{bundle.identFuncionario}" />
				
				<h:outputText value="* #{bundle.acessoFuncionario}" />  
		        <p:selectOneMenu value="#{funcionarioMB.funcionario.acesso}" required="true">  
		            <f:selectItem itemLabel="Selecione" itemValue="" />  
		            <f:selectItem itemLabel="Horário Padrão" itemValue="HORARIO_PADRAO" />  
		            <f:selectItem itemLabel="Horário 2" itemValue="HORARIO_2" />  
		            <f:selectItem itemLabel="Horário 3" itemValue="HORARIO_3" />
		            <f:selectItem itemLabel="Horário 4" itemValue="HORARIO_4" />
		            <f:selectItem itemLabel="Horário 5" itemValue="HORARIO_5" />
		            <f:selectItem itemLabel="Horário Master" itemValue="HORARIO_MASTER" />  
		        </p:selectOneMenu> 	

				<p:commandButton value="#{bundle.update}" icon="ui-icon-plus"
					action="#{funcionarioMB.atualizarFuncionario()}"
					update=":messageGrowl :funcionariosForm:funcionariosTable"
					oncomplete="closeDialogIfSucess(xhr, status, args, funcAtualizarDialogWidget, 'funcAtualizarDialogId')" />
				<p:commandButton value="#{bundle.cancel}" icon="ui-icon-cancel"
					actionListener="#{funcionarioMB.resetFuncionario()}"
					onclick="funcAtualizarDialogWidget.hide();" type="button" />
			</h:panelGrid>
		</h:form>
	</p:dialog>
</h:body>
</html>